package com.study.lxy.springcloud.brac_ia.controller;

import com.study.lxy.springcloud.brac_ia.entity.ClientUser;
import com.study.lxy.springcloud.brac_ia.service.LoginService;
import com.study.lxy.springcloud.common.format.ServiceResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LoginController {
    @Autowired
    private LoginService loginService;
    @RequestMapping(value = "/doLogin",method = RequestMethod.POST)
    public ServiceResp doLogin(@ModelAttribute ClientUser clientUser){
        loginService.doLogin(clientUser);
        return ServiceResp.dummyResp();
    }
    @GetMapping("/gateWay")
    public ServiceResp gateWay(){
        return ServiceResp.buildResult("gateWay success");
    }

}
